<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<script type="text/javascript" src="./js/jquery.min.js"></script>
<title>老师修改密码</title>
</head>
<style type="text/css">
.layui-form{
	width:50%;
	height:100px;
	margin:80px auto;
	
}
.layui-input-block input{
	width:60%;
}
.layui-input-block input{
	float: left;
}
.btn{
	margin-top:30px;
}
</style>
<body>
	<form class="layui-form" action="" id="form">
		<div class="layui-form-item">
                <label class="layui-form-label">新&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;密&nbsp;&nbsp;&nbsp;&nbsp;码</label>
                <div class="layui-input-block">
                    <input type="password" name="te_name" id="te_name" required  lay-verify="required" placeholder="请输入新密码" autocomplete="off" class="layui-input stu_name">
                </div>
            </div>
        <div class="layui-form-item">
                <label class="layui-form-label">确&nbsp;认&nbsp;&nbsp;密&nbsp;&nbsp;码</label>
                <div class="layui-input-block">
                    <input type="password" name="te_name2" id="te_name2" required  lay-verify="required" placeholder="请再次输入新密码" autocomplete="off" class="layui-input stu_name">
                	<span></span>
                </div>
            </div>
       <div class="layui-form-item">
               <div class="layui-input-block buttonOne">
                   <button class="btn layui-btn"  lay-filter="formDemo" onclick="changePassword()">修改密码</button>
               </div>
        </div>
	</form>
</body>

<script type="text/javascript">
 /* 	function sure(){
		var pas1=$('#te_name').val();
		var pas2=$('#te_name2').val();
		if(pas1){}
	}
	
    layui.use('form',function(){
        var form = layui.form;
      }); */
     
      $(function(){
			$(".btn").click(function(){
				var url = "${pageContext.request.contextPath}/changePassword";
				var param = {"te_name":$("#te_name").val()};
				$.post(url,param,function(data){
					if(data.flag==0){
						alert(data.msg);
					}
					if(data.flag==1){
						alert(data.msg);
					}
				});
			});
		}); 
</script>
</html>
